#ifndef __PERSPECTIVE_VIEW_H__
#define __PERSPECTIVE_VIEW_H__

#include "view.h"
#include "camera.h"
#include "model/perspective_model.h"
#include <vector>

typedef  std::vector<Point> vPoint;
class PerspectiveView : public View{
	private:
		GLuint hAxis;
		GLuint hGrid;
		std::vector<Camera*> cameras;
		unsigned int activeCamera;
		PerspectiveModel& pModel;
	public:
		PerspectiveView(Rectangle viewport,GLuint axisHandle,GLuint gridHandle,PerspectiveModel& pModel);
		~PerspectiveView();

		void setEnv();
		void display();
		void update(Observer* observer);

		void drawRail(std::vector<Point>& v);
		void drawCurveShadow();

		void drawColumns();

		unsigned int addCamera(Camera* camera);
		Camera& getCamera(unsigned int num);
		void removeCamera(unsigned int num);

		Camera& getActiveCamera();
		unsigned int getActiveCameraNum();
		void setActiveCamera(unsigned int num);

		void drawSurface(const Points& points,const Points& normalPoints,const std::vector<unsigned int>& index,const std::vector<unsigned int> sizeofSegments);
		void surfaceTest();

		void drawCart();
};

#endif // __PERSPECTIVE_VIEW_H__
